/**
 * Created by liuqiang on 2019/12/27
 * 配置编译环境和线上环境之间的切换
 * 
 */

/*
 *接口域名部分
 */
 
let apiparent = ''
let baonahao = ''
//图片上传路径
let uploadUrl = ''
// 环境变量
let nodeEnv = process.env.NODE_ENV;
//socket-支付地址
let socketUrl = ''
// 阿里oss配置
let aliOssConfig = {
	endpoint: "oss-cn-qingdao-internal.aliyuncs.com",
	accessKeyId: "LTAIaVSlPntE3hgd",
	accessKeySecret: "iJfLV9K0a4DkAIWPawlixYredgCF38",
	bucket: "xiwangchina",
}

if (process.env.NODE_ENV == 'development') {
	//开发
	apiparent = 'https://apiparentfz.xiaohe.com'
	baonahao = 'https://apifz.baonahao.com'
	uploadUrl = 'apiapphome'
	socketUrl = 'https://192.168.1.10:6002'

}else if (process.env.NODE_ENV == 'fz'){
	//仿真
	apiparent = 'https://apiparentfz.xiaohe.com'
	baonahao = 'https://apifz.baonahao.com'
	uploadUrl = 'https://apijianzhanfz.xiaohe.com'
	socketUrl = 'https://socketfz.xiwangchina.com'
}else if(process.env.NODE_ENV == 'production'){
	//生产	
	apiparent = 'https://apiparent.xiaohe.com'
	baonahao = 'https://newapi.baonahao.com'
	uploadUrl = 'https://apijianzhan.xiaohe.com'
	socketUrl = 'https://socket.xiwangchina.com'
}

// 接口配置
let apiConfig = {}
apiConfig[apiparent] = {
	"packey":"ba45d268a19f11e786d24439c44fda44",
	"platform_id":"ba45d268a19f11e786d24439c44fda44",
	"security_code": "3hd*RrMbocrk~==7hGyfpbEZwlEA2nWt]um(eg1.nqM~3vikNh8)T6Lxld5bCP#R"
}
apiConfig[baonahao] = {
	"packey":"f7a3d19f52d6c5ab7841c7b82f03805a",
	"platform_id":"f7a3d19f52d6c5ab7841c7b82f03805a",
	"security_code": "t2)H)@g]R]&[VhG&CJCB?QxdFJH#j)LUIU#VyO^grY[ZjQ)wMz%qxUD6aG8EUFv["
}

export {
	nodeEnv,
	apiparent,
  baonahao,
	uploadUrl,
	apiConfig,
	socketUrl,
	aliOssConfig,
}